package vg.services.graph_view_manager.interfaces.graph_view;

import org.apache.commons.lang.mutable.MutableBoolean;
import vg.services.data_base_manager.data.graph.Attribute;
import vg.services.data_base_manager.data.graph.Edge;
import vg.services.data_base_manager.data.graph.Vertex;

import java.util.Collection;
import java.util.Map;

/**
 * Interface for graph observer.
 *
 * @author Timur Zolotuhin (e-mail: tzolotuhin@gmail.com)
 */
public interface IGraphObserver {
    /**
     * Will be called when user selects some vertices or edges.
     * It will be called from EDT.
     * @param selectedVertex - selected vertices.
     * @param selectedEdge - selected edges.
     */
    public void updateSelectedElements(Map<Vertex, Map<Attribute, MutableBoolean>> selectedVertex, Map<Edge, Map<Attribute, MutableBoolean>> selectedEdge);

    /**
     * Will be called when user selects some vertices or edges.
     * It will be called from EDT.
     * @param selectedVertexAttr - selected attributes for vertices.
     * @param selectedEdgeAttr - selected attributes for edges.
     */
    public void updateSelectedElementsAttributes(Map<Attribute, MutableBoolean> selectedVertexAttr, Map<Attribute, MutableBoolean> selectedEdgeAttr);

    /**
     * Will be called when graph is reset.
     * It will be called from EDT.
     */
    public void resetGraph();

    /**
     * Will be called when graph structure is changed.
     * It will be called from EDT.
     */
    public void changeGraphStructure();
}
